<?php
require("cap.php");
if(isset($_GET['id']) and is_numeric($_GET['id'])){
	require_once("classes/mySQL.php");
	$db = new mySQL();
	$image = $db->myQuery("SELECT `user_logo`,`user_logo_type` FROM `users` WHERE `user_id`='".mysql_escape_string($_GET['id'])."'", 
	    		"trixbi", 
	    		TRUE);
	foreach($image as $image){
		if(strlen($image['user_logo_type']) > 0){
			header("Content-type: ".$image['user_logo_type']."");
			echo $image['user_logo'];
		}
		else
			echo 'Error';
	}
}
else
	echo 'Error';
?>
